package com.jd.mysql.mgr.util;

import javax.servlet.http.HttpServletRequest;

public class ParamUtil {
	public static Integer getIntParam(HttpServletRequest request,String name,Integer defaultValue){
		Integer param = defaultValue;
		String paramStr = request.getParameter(name);
		if(!StringUtil.isNull(paramStr)){
			param = Integer.parseInt(paramStr);
		}
		return param;
	}
	public static String getStringParam(HttpServletRequest request,String name){
		String param = null;
		String paramStr = request.getParameter(name);
		if(!StringUtil.isNull(paramStr)){
			param = paramStr;
		}
		return param;
	}
}
